from fastapi import APIRouter, Header, Depends

from pydantic.main import BaseModel

from api import ok, mysql
from const import tbl__market_industryOverview, tbl__rank_author

router = APIRouter()

from peewee import *

class UnknowField(object):
    def __init__(self, *_, **__): pass

class BaseModel(Model):
    class Meta:
        database = mysql

class RankAuthorUpinformation(BaseModel):
    up_name = CharField(column_name='name', null=True)
    up_img = CharField(column_name='face', null=True)
    up_follower = CharField(column_name='follower', null=True)
    up_following = CharField(column_name='following', null=True)
    up_view = CharField(column_name='view', null=True)
    up_likes = CharField(column_name='likes', null=True)

    class Meta:
        database = mysql
        db_table = tbl__rank_author + 'data'